﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ODataRegression.Framework.Core.TestOM;
using ODataRegression.Framework.Core.MetaDataOM;
using ODataRegression.Framework.Core.Shared;
using ODataTestFrameworkCore.shared;

namespace ODataRegression.Framework.Core.Factories
{
  public  class ODataEndPointTestFactory:ODataTestFactoryBase
    {

     
        public override List<ODataTest> CreateTestList()
        {
            //List<ODataTest> testList = new List<ODataTest>();
            this.testName = ODataTestNames.EndPointTest;
            this.testTile = "Verify the Service End Point is working for selected collection";
            this.FinalQueryURL = this.serviceRoot; 
            if (this.ISAvtiveTest)
            {
                //// It will be executed only once when entitySet==null
                if ( this.entitySet==null)
                {
                    base.CreateTestList();
                }
               
                
            }
            

            return testList;
        }

        public ODataEndPointTestFactory(string serviceRoot, string ServiceName, ODataEntitySet entityset)
            :base( serviceRoot,  ServiceName,  entityset)
        {
            this.entitySet = entityset;
            this.ServiceName = ServiceName;
            this.serviceRoot = serviceRoot;
            this.verificationToken = null;
        }
    }
}
